package com.ljf.daily.makemoneydetail.dto.command;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 赚钱明细记录--账户调整接口  daily_dat_make_money_detail
 *
 * @author LJF
 * @since 2024-11-25
 */
@Data
@ApiModel("赚钱明细记录--账户调整接口")
public class DailyDatMakeMoneyDetailAccountAdjustCommand implements Serializable {

    @JsonProperty("accountCode")
    @ApiModelProperty(value = "账户编码")
    @NotEmpty(message = "调整账户不能为空")
    private String accountCode;

    @JsonProperty("amount")
    @NotNull(message = "调整金额不能为空")
    @ApiModelProperty(value = "调整金额")
    private BigDecimal amount;

    @JsonProperty("belongDate")
    @NotNull(message = "归属时间不能为空")
    @ApiModelProperty(value = "归属时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date belongDate;

    @JsonProperty("remark")
    @ApiModelProperty(value = "备注")
    @Length(message = "备注长度不能超过20个字符", max = 20)
    private String remark;

}
